<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="adexchangebuyer_v1_4.html">Ad Exchange Buyer API</a> . <a href="adexchangebuyer_v1_4.proposals.html">proposals</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#get">get(proposalId)</a></code></p>
<p class="firstline">Get a proposal given its id</p>
<p class="toc_element">
  <code><a href="#insert">insert(body=None)</a></code></p>
<p class="firstline">Create the given list of proposals</p>
<p class="toc_element">
  <code><a href="#patch">patch(proposalId, revisionNumber, updateAction, body=None)</a></code></p>
<p class="firstline">Update the given proposal. This method supports patch semantics.</p>
<p class="toc_element">
  <code><a href="#search">search(pqlQuery=None)</a></code></p>
<p class="firstline">Search for proposals using pql query</p>
<p class="toc_element">
  <code><a href="#setupcomplete">setupcomplete(proposalId)</a></code></p>
<p class="firstline">Update the given proposal to indicate that setup has been completed.</p>
<p class="toc_element">
  <code><a href="#update">update(proposalId, revisionNumber, updateAction, body=None)</a></code></p>
<p class="firstline">Update the given proposal</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="get">get(proposalId)</code>
  <pre>Get a proposal given its id

Args:
  proposalId: string, Id of the proposal to retrieve. (required)

Returns:
  An object of the form:

    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
    #
    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
    &quot;referenceId&quot;: &quot;A String&quot;,
    &quot;referencePayload&quot;: &quot;A String&quot;,
  },
  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
    &quot;A String&quot;,
  ],
  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
    {
      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
        },
        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
        },
      },
      &quot;label&quot;: &quot;A String&quot;, # The label to use.
    },
  ],
  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
  },
  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="insert">insert(body=None)</code>
  <pre>Create the given list of proposals

Args:
  body: object, The request body.
    The object takes the form of:

{
  &quot;proposals&quot;: [ # The list of proposals to create.
    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
        #
        # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
      &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
      },
      &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
      },
      &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
        {
          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
        },
      ],
      &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
        &quot;referenceId&quot;: &quot;A String&quot;,
        &quot;referencePayload&quot;: &quot;A String&quot;,
      },
      &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
        &quot;A String&quot;,
      ],
      &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
      &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
      &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
      &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
      &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
      &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
      &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
        {
          &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
          &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
          &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
            &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
              &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
            },
            &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
              &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
              &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
            },
          },
          &quot;label&quot;: &quot;A String&quot;, # The label to use.
        },
      ],
      &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
      &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
      &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
      &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
      &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
      &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
      &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
      &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
      &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
      &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
        &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
        &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
      },
      &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
        {
          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
        },
      ],
    },
  ],
  &quot;webPropertyCode&quot;: &quot;A String&quot;, # Web property id of the seller creating these orders
}


Returns:
  An object of the form:

    {
  &quot;proposals&quot;: [ # The list of proposals successfully created.
    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
        #
        # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
      &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
      },
      &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
      },
      &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
        {
          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
        },
      ],
      &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
        &quot;referenceId&quot;: &quot;A String&quot;,
        &quot;referencePayload&quot;: &quot;A String&quot;,
      },
      &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
        &quot;A String&quot;,
      ],
      &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
      &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
      &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
      &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
      &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
      &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
      &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
        {
          &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
          &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
          &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
            &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
              &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
            },
            &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
              &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
              &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
            },
          },
          &quot;label&quot;: &quot;A String&quot;, # The label to use.
        },
      ],
      &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
      &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
      &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
      &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
      &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
      &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
      &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
      &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
      &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
      &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
        &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
        &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
      },
      &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
        {
          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
        },
      ],
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(proposalId, revisionNumber, updateAction, body=None)</code>
  <pre>Update the given proposal. This method supports patch semantics.

Args:
  proposalId: string, The proposal id to update. (required)
  revisionNumber: string, The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision. (required)
  updateAction: string, The proposed action to take on the proposal. This field is required and it must be set when updating a proposal. (required)
    Allowed values
      accept - 
      cancel - 
      propose - 
      proposeAndAccept - 
      unknownAction - 
      updateNonTerms - 
  body: object, The request body.
    The object takes the form of:

{ # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
    # 
    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
    &quot;referenceId&quot;: &quot;A String&quot;,
    &quot;referencePayload&quot;: &quot;A String&quot;,
  },
  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
    &quot;A String&quot;,
  ],
  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
    {
      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
        },
        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
        },
      },
      &quot;label&quot;: &quot;A String&quot;, # The label to use.
    },
  ],
  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
  },
  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
}


Returns:
  An object of the form:

    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
    #
    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
    &quot;referenceId&quot;: &quot;A String&quot;,
    &quot;referencePayload&quot;: &quot;A String&quot;,
  },
  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
    &quot;A String&quot;,
  ],
  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
    {
      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
        },
        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
        },
      },
      &quot;label&quot;: &quot;A String&quot;, # The label to use.
    },
  ],
  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
  },
  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="search">search(pqlQuery=None)</code>
  <pre>Search for proposals using pql query

Args:
  pqlQuery: string, Query string to retrieve specific proposals.

Returns:
  An object of the form:

    {
  &quot;proposals&quot;: [ # The list of matching proposals.
    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
        #
        # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
      &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
      },
      &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
        &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
      },
      &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
        {
          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
        },
      ],
      &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
        &quot;referenceId&quot;: &quot;A String&quot;,
        &quot;referencePayload&quot;: &quot;A String&quot;,
      },
      &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
        &quot;A String&quot;,
      ],
      &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
      &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
      &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
      &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
      &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
      &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
      &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
        {
          &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
          &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
          &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
            &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
              &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
            },
            &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
              &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
              &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
            },
          },
          &quot;label&quot;: &quot;A String&quot;, # The label to use.
        },
      ],
      &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
      &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
      &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
      &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
      &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
      &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
      &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
      &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
      &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
      &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
        &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
        &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
      },
      &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
        {
          &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
          &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
        },
      ],
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="setupcomplete">setupcomplete(proposalId)</code>
  <pre>Update the given proposal to indicate that setup has been completed.

Args:
  proposalId: string, The proposal id for which the setup is complete (required)
</pre>
</div>

<div class="method">
    <code class="details" id="update">update(proposalId, revisionNumber, updateAction, body=None)</code>
  <pre>Update the given proposal

Args:
  proposalId: string, The proposal id to update. (required)
  revisionNumber: string, The last known revision number to update. If the head revision in the marketplace database has since changed, an error will be thrown. The caller should then fetch the latest proposal at head revision and retry the update at that revision. (required)
  updateAction: string, The proposed action to take on the proposal. This field is required and it must be set when updating a proposal. (required)
    Allowed values
      accept - 
      cancel - 
      propose - 
      proposeAndAccept - 
      unknownAction - 
      updateNonTerms - 
  body: object, The request body.
    The object takes the form of:

{ # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
    # 
    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
    &quot;referenceId&quot;: &quot;A String&quot;,
    &quot;referencePayload&quot;: &quot;A String&quot;,
  },
  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
    &quot;A String&quot;,
  ],
  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
    {
      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
        },
        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
        },
      },
      &quot;label&quot;: &quot;A String&quot;, # The label to use.
    },
  ],
  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
  },
  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
}


Returns:
  An object of the form:

    { # Represents a proposal in the marketplace. A proposal is the unit of negotiation between a seller and a buyer and contains deals which are served. Each field in a proposal can have one of the following setting:
    #
    # (readonly) - It is an error to try and set this field. (buyer-readonly) - Only the seller can set this field. (seller-readonly) - Only the buyer can set this field. (updatable) - The field is updatable at all times by either buyer or the seller.
  &quot;billedBuyer&quot;: { # Reference to the buyer that will get billed for this proposal. (readonly)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyer&quot;: { # Reference to the buyer on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
  },
  &quot;buyerContacts&quot;: [ # Optional contact information of the buyer. (seller-readonly)
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
  &quot;buyerPrivateData&quot;: { # Private data for buyer. (hidden from seller).
    &quot;referenceId&quot;: &quot;A String&quot;,
    &quot;referencePayload&quot;: &quot;A String&quot;,
  },
  &quot;dbmAdvertiserIds&quot;: [ # IDs of DBM advertisers permission to this proposal.
    &quot;A String&quot;,
  ],
  &quot;hasBuyerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off. Once both sides have signed off on a deal, the proposal can be finalized by the seller. (seller-readonly)
  &quot;hasSellerSignedOff&quot;: True or False, # When an proposal is in an accepted state, indicates whether the buyer has signed off Once both sides have signed off on a deal, the proposal can be finalized by the seller. (buyer-readonly)
  &quot;inventorySource&quot;: &quot;A String&quot;, # What exchange will provide this inventory (readonly, except on create).
  &quot;isRenegotiating&quot;: True or False, # True if the proposal is being renegotiated (readonly).
  &quot;isSetupComplete&quot;: True or False, # True, if the buyside inventory setup is complete for this proposal. (readonly, except via OrderSetupCompleted action) Deprecated in favor of deal level setup complete flag.
  &quot;kind&quot;: &quot;adexchangebuyer#proposal&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;adexchangebuyer#proposal&quot;.
  &quot;labels&quot;: [ # List of labels associated with the proposal. (readonly)
    {
      &quot;accountId&quot;: &quot;A String&quot;, # The accountId of the party that created the label.
      &quot;createTimeMs&quot;: &quot;A String&quot;, # The creation time (in ms since epoch) for the label.
      &quot;deprecatedMarketplaceDealParty&quot;: { # Information about the party that created the label.
        &quot;buyer&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal-party.
          &quot;accountId&quot;: &quot;A String&quot;, # Adx account id of the buyer.
        },
        &quot;seller&quot;: { # The buyer/seller associated with the deal. One of buyer/seller is specified for a deal party.
          &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
          &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
        },
      },
      &quot;label&quot;: &quot;A String&quot;, # The label to use.
    },
  ],
  &quot;lastUpdaterOrCommentorRole&quot;: &quot;A String&quot;, # The role of the last user that either updated the proposal or left a comment. (readonly)
  &quot;name&quot;: &quot;A String&quot;, # The name for the proposal (updatable)
  &quot;negotiationId&quot;: &quot;A String&quot;, # Optional negotiation id if this proposal is a preferred deal proposal.
  &quot;originatorRole&quot;: &quot;A String&quot;, # Indicates whether the buyer/seller created the proposal.(readonly)
  &quot;privateAuctionId&quot;: &quot;A String&quot;, # Optional private auction id if this proposal is a private auction proposal.
  &quot;proposalId&quot;: &quot;A String&quot;, # The unique id of the proposal. (readonly).
  &quot;proposalState&quot;: &quot;A String&quot;, # The current state of the proposal. (readonly)
  &quot;revisionNumber&quot;: &quot;A String&quot;, # The revision number for the proposal (readonly).
  &quot;revisionTimeMs&quot;: &quot;A String&quot;, # The time (ms since epoch) when the proposal was last revised (readonly).
  &quot;seller&quot;: { # Reference to the seller on the proposal. (readonly, except on create)
    &quot;accountId&quot;: &quot;A String&quot;, # The unique id for the seller. The seller fills in this field. The seller account id is then available to buyer in the product.
    &quot;subAccountId&quot;: &quot;A String&quot;, # Optional sub-account id for the seller.
  },
  &quot;sellerContacts&quot;: [ # Optional contact information of the seller (buyer-readonly).
    {
      &quot;email&quot;: &quot;A String&quot;, # Email address of the contact.
      &quot;name&quot;: &quot;A String&quot;, # The name of the contact.
    },
  ],
}</pre>
</div>

</body></html>